package com.thor.palmmall.rest.order.converter;

import org.springframework.core.convert.converter.Converter;

import com.thor.palmmall.rest.order.AProductTaxRate;
import com.thor.palmmall.spi.order.SProductTaxRate;

public class AProductTaxRateConverter implements Converter<SProductTaxRate,AProductTaxRate>{
	private static AProductTaxRateConverter instance;
	public static AProductTaxRateConverter getInstance() {
		if (instance == null)
			instance = new AProductTaxRateConverter();
		return instance;
	}
	@Override
	public AProductTaxRate convert(SProductTaxRate source) {
		AProductTaxRate target = new AProductTaxRate();
		target.setTaxType(source.getTaxType());
		target.setRate(source.getRate());
		target.setName(source.getName());
		target.setValue(source.getValue());
		target.setCaption(source.getCaption());
		return target;
	}
}
